//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#include "../NullPointerException.h"

using namespace Native::System;

void CNullPointerException::Check(
    C_SCENE& scene,
    POINTER const pointer,
    WSTRING& arguments,
    WSTRING& detail) throw()
{
    if (pointer == nullptr) {
        throw CNullPointerException(scene, arguments, detail);
    }
}

CNullPointerException::CNullPointerException()
{
}

CNullPointerException::CNullPointerException(C_NULL_POINTER_EXCEPTION& that)
    :CException(that)
{
}

CNullPointerException::CNullPointerException(C_NULL_POINTER_EXCEPTION&& that)
    :CException(that)
{
}

CNullPointerException::CNullPointerException(C_SCENE& scene, WSTRING& arguments, WSTRING& detail)
{
    Append(CCase(scene, L"It is a null pPointer", arguments, detail));
}
